mod modA {
    #[derive(Debug)]
    pub struct A {
        pub num: i32,
        pub name: String,
    }

    impl A {
        pub fn new() -> A {
            return A {
                num: 1,
                name: String::from("aa"),
            };
        }

        pub fn print(&self) {
            println!("num={}, name={}", self.num, self.name);
        }
    }
}

mod modB {
    pub fn print(){
        println!("B");
    }

    pub mod modC{
        pub fn print(){
            println!("C");
            super::print();
        }
    }
}

use modA::A;
// use modB::print;

fn main() {
    println!("=====模块A=====");
    {
        let mut a = A::new();
        a.print();

        let mut  num = a.num;
        let mut  name = a.name;
        println!("num={}, name={}", num, name);
    }

    println!("=====模块B=====");
    {
        modB::print();
        modB::modC::print();
    }



}
